<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

    <title>选择地址</title>

    <link href="__PUBLIC__/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

    <link href="__PUBLIC__/css/personal.css" rel="stylesheet" type="text/css">
    <link href="__PUBLIC__/css/addstyle.css" rel="stylesheet" type="text/css">
    <script src="__PUBLIC__/AmazeUI-2.4.2/assets/js/jquery.min.js" type="text/javascript"></script>
    <script src="__PUBLIC__/AmazeUI-2.4.2/assets/js/amazeui.js"></script>
    <script src="__PUBLIC__/js/global.js"></script>
    <script src="__PUBLIC__/layer/layer.js"></script>
</head>

<body>

<div class="center">
    <div class="col-main">
        <div class="main-wrap">

            <div class="user-address">
                <!--标题 -->
                <div class="am-cf am-padding">
                    <div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">选择地址</strong>
                        <!--/<small>Address&nbsp;list</small>-->
                    </div>
                </div>
                <hr/>
                <ul class="am-avg-sm-1 am-avg-md-3 am-thumbnails">
                    <volist name="addressList" id="vo">
                    <li class="user-addresslist defaultAddr" >
                        <!--<span class="new-option-r"><i class="am-icon-check-circle"></i>默认地址</span>-->
                        <div onclick="window.location.href='http://www.jipintc.com/Home/ShopCart/shop3?address_id={$vo.address_id}&order_id={$order_id}'">
                        <p class="new-tit new-p-re">
                            <span class="new-txt">{$vo.consignee}</span>
                            <span class="new-txt-rd2">{$vo.mobile}</span>
                        </p>
                        <div class="new-mu_l2a new-p-re">
                            <p class="new-mu_l2cw">
                                <span class="title">地址：</span>
                                <span class="province">{$vo.province}</span>
                                <span class="city">{$vo.city}</span>
                                <span class="dist">{$vo.district}</span>
                                <span class="street">{$vo.area} {$vo.address}</span></p>
                        </div>
                        </div>
                        <div class="new-addr-btn">
                            <a href="#" onclick="editAddress({$vo.address_id})"><i class="am-icon-edit"></i>编辑</a>
                            <!--<span class="new-addr-bar">|</span>-->
                            <!--<a href="javascript:void(0);" onclick="delClick({$vo.address_id});"><i class="am-icon-trash"></i>删除</a>-->
                        </div>
                    </li>
                    </volist>

                </ul>
                <div class="clear"></div>
                <a class="new-abtn-type" onclick="addAddress()">添加新地址</a>
            </div>

            <script type="text/javascript">
                $(document).ready(function () {
                    $(".new-option-r").click(function () {
                        $(this).parent('.user-addresslist').addClass("defaultAddr").siblings().removeClass("defaultAddr");
                    });

                    var $ww = $(window).width();
                    if ($ww > 640) {
                        $("#doc-modal-1").removeClass("am-modal am-modal-no-btn")
                    }

                })
            </script>


        </div>


    </div>


</div>

</body>

<script type="text/javascript">

/*    $(function () {

        var f = '{$flag}';
        if(f == 1)
        {
//            layer.open({
//                content: '未添加地址'
//                ,skin: 'msg'
//                ,time: 1000 //2秒后自动关闭
//            });
            layer.msg('未添加地址');

            window.location.href='__APP__/Home/Me/address';

        }
    })*/

    function addAddress(){

        window.location.href = '__APP__/Home/Me/addressUI?order_id={$order_id}';

    }


    function editAddress(addressId){


        window.location.href = '__APP__/Home/Me/addressUI?address_id=' + addressId + '&order_id={$order_id}';

    }

</script>

</html>